#ifndef OBJECTLIST_H_
#define OBJECTLIST_H_

#include "List.h"
#include "Border.h"
#include "Object.h"
#include "Vector2D.h"
#include "Dictionary.h"

class AbrahamLincoln;
class ObjectList
{
	bool ownsObjects;
	public:
	List<Object> * head;
	
	public:
	ObjectList();
	ObjectList(bool ownsObjects);
	ObjectList(Object * headObject);
	~ObjectList();
	void Add(Object * payload);
	void Draw();
	void AddGravity();
	void CheckCollisions(double elapsedTime);
	void CheckCollisions(double elapsedTime, Border * border);
	void CheckCollisions(List<Object> * start, double elapsedTime);
	void CheckCollisions(double elapsedTime, ObjectList * anotherList);
	void Think(float elapsedTime);
	void CreateObjects();
	void DestroyObjects(AbrahamLincoln * player);
	Object * Action(Vector2D playerPos, Dictionary * gameState, char ** text);
	Vector2D GetMidpoint();
	float GetWidth();
};
#endif
